<?php use_stylesheets_for_form($formPersona) ?>
<?php use_javascripts_for_form($formPersona) ?>

<form id="reservaspersonasregistro" name="reservaspersonasregistro" action="<?php echo url_for('reservas/'.($formPersona->getObject()->isNew() ? 'createPersona' : 'updatePersona').(!$formPersona->getObject()->isNew() ? '?id='.$formPersona->getObject()->getId().'&dsorder='.$formPersona->getObject()->getReservasAlquileres()->getDsorder() : '')) ?>" method="post" <?php $formPersona->isMultipart() and print 'enctype="multipart/form-data" ' ?>>
<input type="hidden" name="reservaspersonasregistro[reserva_id]" value="<?php echo $sf_request->getParameter('reserva_id') ?>" id="reservaspersonasregistro_reserva_id" />
<input type="hidden" name="reservaspersonasregistro[dsorder]" value="<?php echo $sf_request->getParameter('dsorder') ?>" id="reservaspersonasregistro_dsorder" />
<div> 
          <?php if($sf_request->getParameter('reserva_id') != ""): ?>
          <a class="actions newuser" href="<?php echo url_for('reservas/show?id='.$sf_request->getParameter('reserva_id').'&dsorder='.$sf_request->getParameter('dsorder')) ?>"><?php echo __('backToList') ?></a>
          <?php else: ?>
          <a class="actions newuser" href="<?php echo url_for('reservas/show?id='.$formPersona->getObject()->getReservasAlquileres()->getId().'&dsorder='.$sf_request->getParameter('dsorder')) ?>"><?php echo __('backToList') ?></a>
          <?php endif ?>
          </div>
<?php if (!$formPersona->getObject()->isNew()): ?>
<input type="hidden" name="sf_method" value="put" />
<?php endif; ?>
  <table>
    <tfoot>
       <tr>
        <td colspan="2">
          <?php echo $formPersona->renderHiddenFields(true) ?>
          <input type="submit" value="<?php echo __('guardarModificaciones') ?>" class="buttonSearchHotel" style="margin-bottom: 10px;"/>
          <div> 
          <?php if($sf_request->getParameter('reserva_id') != ""): ?>
          <a class="actions newuser" href="<?php echo url_for('reservas/show?id='.$sf_request->getParameter('reserva_id').'&dsorder='.$sf_request->getParameter('dsorder')) ?>"><?php echo __('backToList') ?></a>
          <?php else: ?>
          <a class="actions newuser" href="<?php echo url_for('reservas/show?id='.$formPersona->getObject()->getReservasAlquileres()->getId().'&dsorder='.$sf_request->getParameter('dsorder')) ?>"><?php echo __('backToList') ?></a>
          <?php endif ?>
          </div>
        </td>
      </tr>
    </tfoot>
    <tbody>
      <?php echo $formPersona->renderGlobalErrors() ?>
      <tr>
        <th><?php echo $formPersona['sexoreserva']->renderLabel() ?></th>
        <td>
          <?php echo $formPersona['sexoreserva']->renderError() ?>
          <?php echo $formPersona['sexoreserva'] ?>
        </td>
      </tr>
      <tr>
        <th><?php echo $formPersona['nombrereserva']->renderLabel() ?></th>
        <td>
          <?php echo $formPersona['nombrereserva']->renderError() ?>
          <?php echo $formPersona['nombrereserva'] ?>
        </td>
      </tr>
      <tr>
        <th><?php echo $formPersona['apellidosreserva']->renderLabel() ?></th>
        <td>
          <?php echo $formPersona['apellidosreserva']->renderError() ?>
          <?php echo $formPersona['apellidosreserva'] ?>
        </td>
      </tr>
      <tr>
        <th><?php echo $formPersona['fechanacreserva']->renderLabel() ?></th>
        <td>
          <?php echo $formPersona['fechanacreserva']->renderError() ?>
          <?php echo $formPersona['fechanacreserva'] ?>
        </td>
      </tr>
      <tr>
        <th><?php echo $formPersona['paisreserva']->renderLabel() ?></th>
        <td>
          <?php echo $formPersona['paisreserva']->renderError() ?>
          <?php echo $formPersona['paisreserva'] ?>
        </td>
      </tr>
      <tr>
        <th><?php echo $formPersona['tipodocumentoreserva']->renderLabel() ?></th>
        <td>
          <?php echo $formPersona['tipodocumentoreserva']->renderError() ?>
          <?php echo $formPersona['tipodocumentoreserva'] ?>
        </td>
      </tr>
      <tr>
        <th><?php echo $formPersona['dnipasaportereserva']->renderLabel() ?></th>
        <td>
          <?php echo $formPersona['dnipasaportereserva']->renderError() ?>
          <?php echo $formPersona['dnipasaportereserva'] ?>
        </td>
      </tr>
    </tbody>
  </table>
</form>